package com.woniu.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.woniu.entity.Auth;

import com.woniu.entity.response.ResponseEntity;
import com.woniu.service.IAuthService;
import com.woniu.service.impl.AuthServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author hyl
 * @since 2022-08-28
 */
@RestController
@RequestMapping("/brain/auth")
public class AuthController {
    @Autowired
    private AuthServiceImpl authServiceImpl;


    @GetMapping("/list")
    public ResponseEntity<List<Auth>> list() {
        return ResponseEntity.success(authServiceImpl.getParentAccess());
    }

    @GetMapping(value = "/refuse", produces = "application/json;charset=utf-8")
    @ResponseBody
    public String refuse() {
        return "您没有权限访问该页面";
    }

}
